# !/usr/bin python3
# encoding: utf-8 -*-
# @file     : member_actions.py
# @author   : 沙陌 Matongxue_2
# @Time     : 2023/9/7 21:53
# @Copyright: 北京码同学
from pages.buyer.home_page import HomePage


class MemberActions:

    def add_address(self,name='沙陌0530班',
                    phone='18729399607',
                    select_flag=True,
                    detail_address='这是详细地址',
                    ship_address='这是地址别名'):
        address_page = HomePage().click_enter_personcenter().click_address_menu()\
            .click_add_address()\
            .send_keys_name(name)\
            .send_keys_phone(phone)\
            .send_keys_detail_address(detail_address)\
            .send_keys_ship_address(ship_address)
        if select_flag:
            address_page.select_address()
        address_page.click_confirm_btn()
